package br.com.sgp.util.handling;

import org.apache.wicket.ajax.AjaxRequestTarget;
import org.apache.wicket.ajax.markup.html.form.AjaxButton;
import org.apache.wicket.markup.html.form.Form;
import org.apache.wicket.markup.html.list.AbstractItem;

public abstract class ErrorHandlingAjaxButtonList extends AjaxButton{
    private static final long serialVersionUID = -2108794978391387411L;
	final AbstractItem rowItem;

    public ErrorHandlingAjaxButtonList(final String id, final AbstractItem item) {
        super(id);

        this.rowItem = item;
    }
    
    @Override
    protected void onSubmit(final AjaxRequestTarget target, final Form<?> form) {
        // here you cand do everything you want with the item and the model object of the item.(row)
//        Object object = rowItem.getModelObject();
    }

}
